import requests

from commen.ihrm_login_token import login_token


class AddEmpApi(object):
    @classmethod
    def add_emp(cls,token,data_json):
        resp = requests.post(url= 'http://ihrm-test.itheima.net/api/sys/user',
                             headers={"Authorization":token},
                             json=data_json)
        return resp
if __name__ == '__main__':
    data= {"username": "嘿嘿","mobile": "13419876880","workNumber": "123456789012"}
    token = login_token()
    resp =AddEmpApi.add_emp(token,data)
    print(resp.json())

